﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Chapter20.View
{
    using System.Data;
    using Chapter20.ViewModel;

    /// <summary>
    /// CategoryWindow.xaml 的交互逻辑
    /// </summary>
    public partial class CategoryWindow : Window
    {

        private DataTable categories;

        public CategoryWindow()
        {
            InitializeComponent();
            categories = App.StoreDBDataSet.GetCategories();
            DataContext = categories.DefaultView;
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var cmd = (Button)sender;
            int product = (int)cmd.Tag;
            
        }
    }
}
